package com.fastCms.business.bim.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fastCms.business.frame.constant.CommonConst;
import com.fastCms.business.bim.daos.DeviceTypeMapper;
import com.fastCms.business.bim.pojo.entity.DeviceType;
import com.fastCms.business.bim.service.DeviceTypeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 设备分类表 服务实现类
 * </p>
 *
 * @author liusq
 * @since 2021-03-22
 */
@Service
public class DeviceTypeServiceImpl extends ServiceImpl<DeviceTypeMapper, DeviceType> implements DeviceTypeService {

    @Override
    public List<DeviceType> findByDevices() {
        QueryWrapper<DeviceType> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("state", CommonConst.STATE.VALID);
        return list(queryWrapper);
    }
}
